 {
        
   cc.Class({
            extends: cc.Component,
            properties: {},
            onLoad: function () {
                this.boolCheckRedPacket = !1, Global.notificationCenter.on(Global.eventName.MSG_POPUPDATA_INVITE_FRIEND_HELP, this.onPulled_BeInviteFriendData.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_SHARE_FRIEND_ENTER, this.onPulled_shareGroupFriendEnter.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_UPDATE_QUERY, this.query_doAction.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_REQUEST_RED_PACKET, this.onPulled_PrizeDate.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_REQUEST_RED_PACKET_OPEN, this.onOpenRedPacket.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSG_REQUEST_RED_PACKET_CHECK, this.onCheckRedPacket.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.MSH_SHARE5, this.onReceivedReward.bind(this), this);
            },
            start: function () {
            },
            onPulled_PrizeDate: function (e) {
                if (console.log("+++++++++++++领取奖励+++++++++++++++"), e.error) {
                    if (console.log("onPulled_PrizeDate error code:", e.error, e.error.code), -1e3 == e.error.code) {
                        var t = {
                            text: e.error.info,
                            confirmText: "确定",
                            confirmSp: Global.spriteAtlas.getOKSpf()
                        };
                        Global.UIPopupManager.alert(t);
                    }
                } else if (1 == e.result.operateOk) {
                    var n = function () {
                    };
                    Global.tableModel.isInGameScene() ? Global.tableModel.getIsGameEnd() && (n = function () {
                        var e = {
                            playMode: Global.roomInfoModel.getPlayModel() || Global.config.playModel.XUELIU,
                            gameId: Global.config.GAMEID || Global.config.GAMEID_NORMAL,
                            type: "onPulled_PrizeDate"
                        };
                        Global.notificationCenter.emit(Global.eventName.MSG_DO_QUICK_START, e);
                    }) : n = function () {
                        var e = {
                            playMode: Global.roomInfoModel.getPlayModel() || Global.config.playModel.XUELIU,
                            gameId: Global.config.GAMEID || Global.config.GAMEID_NORMAL,
                            type: "onPulled_PrizeDate"
                        };
                        Global.notificationCenter.emit(Global.eventName.MSG_DO_QUICK_START, e);
                    }, this.scheduleOnce(function () {
                        var e = {
                            reward: 3e3,
                            pic: Global.spriteAtlas.getSpriteFrame("WP_3"),
                            name: "金币",
                            type: "freegive"
                        };
                        Global.UIPopupManager.addPopup("PopupPanel/Panel_shareGroup_Reward", function (t) {
                            t.getComponent("shareGroup_RewardPanel").setData(e, n);
                        });
                    }.bind(this), .1);
                }
            },
            onOpenRedPacket: function (e) {
                if (e.error) {
                    if (-11 == e.error.code) {
                        var t = "今日已经转运，快去游戏中试试吧";
                        Global.utils.showNodeCommon(t, 3);
                    }
                    console.log("+++++++++++++拆红包提示+++++++++++++++", e.error.info);
                    var n = Global.config.QueryTag.getRedPacket;
                    Global.query && Global.query.extraInfo && Global.query.extraInfo[n] && (Global.query.extraInfo[n] = null,
                        console.log("+++++++++++++拆红包key删除1+++++++++++++++"));
                } else if (1 == e.result.operateOk && Global.query.extraInfo) {
                    t = "您领取了" + Global.query.extraInfo.helpName + "的转运礼包，获得了3000金币";
                    this.boolCheckRedPacket ? this.scheduleOnce(function () {
                        Global.utils.showNodeCommon(t, 3);
                    }.bind(this), 3) : (this.boolCheckRedPacket = !1, Global.utils.showNodeCommon(t, 3));
                    n = Global.config.QueryTag.getRedPacket;
                    Global.query && Global.query.extraInfo && Global.query.extraInfo[n] && (Global.query.extraInfo[n] = null);
                }
            },
            onCheckRedPacket: function (e) {
                if (console.log("+++++++++++++检查红包+++++++++++++++", e), this.boolCheckRedPacket = !1,
                    e.error) e.error.code; else if (1 == e.result.operateOk) {
                    var t = e.result.notifiedList, n = "", o = 0, i = t.length;
                    if (t.length > 0) {
                        for (var a = 0; a < t.length; a++) this.boolCheckRedPacket = !0, a < 2 && (1 == i ? n += Global.utils.getFixString(t[a].nick, 6) : i >= 2 && (0 == a ? n += Global.utils.getFixString(t[a].nick, 6) : 1 == a && (n = n + "," + Global.utils.getFixString(t[a].nick, 6)))),
                            o += t[a].deltaChip;
                        if (1 == i) var r = "您收到了来自" + n + "的" + o + "金币"; else if (i >= 2) r = "您收到了来自" + n + "等" + i + "位好友的" + o + "金币";
                        Global.utils.showNodeCommon(r, 3);
                    }
                }
            },
            query_doAction: function () {
                var e = Global.query;
                console.log("query_doAction :", e);
                var t = Global.myLaunchOption.scene;
                if (e) {
                    var n = "";
                    if (e.extraInfo && e.extraInfo[Global.config.QueryTag.inviteToFriRoom]) {
                        var o = e.extraInfo.createRoomID;
                        Global.msgHandler.requestJoinRoom(o), n = "inviteToFriRoom", console.log(n, " 更新query后的操作:1111");
                    } else if (e.extraInfo && e.extraInfo[Global.config.QueryTag.inviteFriReward]) Global.utils_Share.showBeInvitedAlert(),
                        n = "inviteFriReward", console.log(n, " 更新query后的操作:2222"); else if (e.extraInfo && e.extraInfo[Global.config.QueryTag.groupRank]) {
                        var i = Global.myLaunchOption.shareTicket;
                        Global.notificationCenter.emit(Global.eventName.MSG_UPDATE_RANK_TYPE, i), n = "groupRank",
                            console.log(n, " 更新query后的操作:3333");
                    } else if (e.extraInfo && e.extraInfo[Global.config.QueryTag.getRedPacket]) Global.utils_Share.showGetRedPacket(),
                        n = "getRedPacket", console.log(n, " 更新query后的操作:6666"); else if (console.log("更新query后的操作:7777,scene: ", t),
                    1074 == t && e && "tyscmj_gzh" == e.from) {
                        if (e.from = "", e.type && "100" == e.type) {
                            n = "tyscmj_gzh", console.log(n, " 更新query后的操作:7777");
                            Global.msgHandler.requestTaskShareSuccess("gzh_guanzhu");
                        }
                    } else 1035 == t && e && "tyscmj_gzh" == e.from ? console.log(n, " 更新query后的操作:8888") : 1104 == t && console.log(n, " 更新query后的操作:9999");
                }
            },
            onPulled_BeInviteFriendData: function (e) {
                if (e) if (e.error) {
                    console.log("onPulled_AllPrizeData error info:", e.error.info);
                    var t = Global.config.QueryTag.inviteFriReward;
                    Global.query && Global.query.extraInfo && Global.query.extraInfo[t] && (Global.query.extraInfo[t] = null);
                } else if (e.result) {
                    var n = e.result, o = {
                        text: "您已帮助玩家" + n.helperName + "成功获得" + n.rewards.count + "金币 \n 今日剩余帮助次数：" + n.currIndex + "/" + n.maxIndex,
                        confirmText: "确定",
                        confirmSp: Global.spriteAtlas.getOKSpf(),
                        confirmCallback: function () {
                            var e = Global.config.QueryTag.inviteFriReward;
                            Global.query && Global.query.extraInfo && Global.query.extraInfo[e] && (Global.query.extraInfo[e] = null);
                        },
                        needCloseBtn: !1,
                        isPersist: !0
                    };
                    Global.UIPopupManager.alert(o);
                }
            },
            onPulled_shareGroupFriendEnter: function (e) {
                if (e.info) {
                    var t = {
                        text: e.info,
                        confirmText: "确定",
                        confirmSp: Global.spriteAtlas.getOKSpf(),
                        confirmCallback: function () {
                            var e = Global.config.QueryTag.shareToGroup;
                            Global.query && Global.query.extraInfo && Global.query.extraInfo[e] && (Global.query.extraInfo[e] = null);
                        },
                        needCloseBtn: !1
                    };
                    Global.UIPopupManager.alert(t);
                }
            },
            onReceivedReward: function (e) {
                console.log("onReceivedReward"), e && 1 == e.ok && Global.msgHandler.requestTaskData();
            }
        })
    }